import React from "react";
import './Card.css'

class Card extends React.Component {
    constructor(props) {
        super(props);
        this.state = {

        }
    }

    render() {
        return (
            <div>
                <div className="card_container">
                    {
                        this.props.goods.map((ele, index) => {
                            return <div className="card" key={index}>
                                <img width="100%" src={ele.mainPic}></img>
                                <p>{ele.title}</p>
                                <p className="card_price">
                                    ￥{ele.actualPrice}
                                </p>
                            </div>
                        })
                    }

                </div>
            </div>
        )
    }
}

export default Card;
